package reflectTest.getMethod;

import java.lang.reflect.Method;

/**
 * 测试 getDeclaredMethods与getMethods的区别
 * 在于当前类的区别和3p修饰符
 * @author lcx
 *
 */
public class Test {

	public static void main(String[] args) throws ClassNotFoundException {
		Class son=Class.forName("reflectTest.getMethod.Son");
		Method[] methods1=son.getDeclaredMethods();
		for(Method med:methods1)
			System.out.println("getDeclaredMethods:    "+med);
		
		System.out.println("    ");
		Method[] methods2=son.getMethods();
		for(Method med:methods2)
			System.out.println("getMethods:    "+med);
	}
}
